<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
  <head>
    <title>Coverband Info: <%= Coverband::VERSION %></title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <script src='<%= assets_path('dependencies.js') %>' type='text/javascript'></script>
    <script src='<%= assets_path('application.js') %>' type='text/javascript'></script>
    <link href='<%= assets_path('application.css') %>' media='screen, projection, print' rel='stylesheet' type='text/css'>
    <link rel="icon" type="image/png" href="<%= assets_path('favicon.png') %>" />
  </head>

  <body>
    <div id="wrapper" style="">
      <%= display_nav(active_link: tracker.route) %>
      <div id="content">
        <h4>
          <% if Coverband.configuration.web_enable_clear %>
            <%= button("#{base_path}clear_#{tracker.route}", "reset #{tracker.title} tracker", delete: true) %>
          <% end %>
        </h4>
        <h2>Unused <%= tracker.title %>: (<%= tracker.unused_keys.length %>)</h2>
        <p>These <%= tracker.title %> have not been rendered since recording started at <%= tracker.tracking_since %></p>
        <ul>
        <% tracker.unused_keys.each do |key| %>
          <li class="unused-keys"><%= key %></li>
        <% end %>
        </ul>

        <h2>Used <%= tracker.title %>: (<%= tracker.used_keys.length %>)</h2>
        <p>These <%= tracker.title %> have been rendered at least once</p>
        <ul>
        <% tracker.used_keys.each_pair do |key, time_at| %>
          <li class="used-keys">
            <%= key %>
            <span class="last_seen_at">last activity recorded <%= Time.at(time_at.to_i)%></span>
            <% if Coverband.configuration.web_enable_clear %>
              <%= button("#{base_path}clear_#{tracker.route}_key?key=#{key}", 'reset tracked key', delete: true) %>
            <% end %>
          </li>
        <% end %>
        </ul>
      </div>
      <div id="footer">
        Generated by <a href="http://github.com/danmayer/coverband">Coverband</a> v<%= Coverband::VERSION %>
      </div>
    </div>
  </body>
</html>
